// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include "jc.h"

BOOL APIENTRY DllMain( HMODULE hModule,
					   DWORD  ul_reason_for_call,
					   LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

#if _DEBUG

extern "C"{

	typedef struct SA
	{
		int		age;
		wchar_t	c;
		size_t getHashCode()
		{
			return age;
		}

		bool operator==(const SA &b)
		{
			return age == b.age;
		}
	}SA;

#ifndef _WIN64
__declspec(dllexport) void debug(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow)
#else
__declspec(dllexport) void debug(void)
#endif
{
	//JStream::Test();
	//JString::Test();
	JHashMap<SA, SA> x;
	JHashMap<SA, int> y;

	for(int i=1; i<10; i++)
	{
		SA sa, sb;
		sa.age = i;
		sa.c = L'p';

		sb.age = i;
		sb.c = L'Q';

		x.set(sa, sb);

		int m;
		y.set(sa, m = 10);
	}

	for(int i=1; i<12; i++)
	{
		SA sa;

		sa.age = i;
		sa.c = L'p';

		SA& sb = x.get(sa);
		if(&sb)
		{
			int j= 0;
		}
	}

	

}

}

#endif
